<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link rel="stylesheet" type="text/css" href="assets/css/reset.css" />
    <link rel="stylesheet" type="text/css" href="assets/css/index.css" />
  </head>
  <body>
    <div id="scene">
      <img data-depth="0.2" src="assets/img/moon.png" class="moon" />
    </div>
    <script src="node_modules/parallax-js/dist/parallax.min.js"></script>
    <script>
      var scene = document.getElementById('scene')
      var parallaxInstance = new Parallax(scene, {
        relativeInput: true,
        // 光标停止时生效
        hoverOnly: true,
        // 跟随鼠标左右移动
        invertX: false,
        invertY: false,
        // 限制Y轴变动
        limitY: 0
      })
    </script>
  </body>
</html>
